package com.object;

import com.object.module.lq.chatroom.websocketcomfig.NettyWebSocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.Resource;

@SpringBootApplication
@EnableSwagger2
@MapperScan(basePackages = "com.object.module.*.mapper")
public class LQApplication implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication.run(LQApplication.class, args);
    }

    @Resource
    private NettyWebSocketServer nettyServer;

    @Override
    public void run(String... args) throws Exception {
        nettyServer.start();
    }
}
